package day8homework;

public class SubCar extends Car {
	private int price;
	private int speed;
	
	public SubCar() {
		
	}
	
	public SubCar(int price, int speed) {
		super();
		this.price = price;
		this.speed = speed;
	}

	public int speedChange(int newSpeed) {
		speed = newSpeed;
		return speed;
	}

	public int getPrice() {
		return price;
	}

	public void setPrice(int price) {
		this.price = price;
	}

	public int getSpeed() {
		return speed;
	}

	public void setSpeed(int speed) {
		this.speed = speed;
	}
}
